package com.hzhc.controller.baseinfo;

import com.hzhc.common.BaseController;
import com.hzhc.entity.CompanyInfo;
import com.hzhc.enumBean.ResultUtilCodeEnum;
import com.hzhc.service.CompanyInfoService;
import com.hzhc.utils.ResultUtil;
import com.hzhc.vo.CompanyInfoVo;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 客户信息 前端控制器
 * </p>
 *
 * @author 功不唐捐
 * @since 2024-09-10
 */
@RestController
@RequiredArgsConstructor
@RequestMapping("/companyInfo")
public class CompanyInfoController extends BaseController {

    private final CompanyInfoService companyInfoService;

    /**
     * 根据id查询车队信息
     * @param vo
     * @return
     */
    @RequestMapping("/getCarTeamById")
    public ResultUtil<CompanyInfo> getCarTeamById(@RequestBody CompanyInfoVo vo) {
        CompanyInfo companyInfo = companyInfoService.getById(vo.getId());
        return ResultUtil.build(companyInfo, ResultUtilCodeEnum.SUCCESS);
    }

}
